/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bayu.controller;

import com.bayu.services.dao.ListrikDao;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author Bayu
 */

@Controller
public class ListrikNote {
  private ListrikDao listrikDao;

  @Autowired
  private void setListrikDao(ListrikDao listrikDao){
      this.listrikDao = listrikDao;
  }

  @RequestMapping("/listrik-note.htm")
  public void showNote(ModelMap map){
     List data = this.listrikDao.getAllByDate(MainController.startDate,MainController.endDate);
     map.addAttribute("data", data);
     map.addAttribute("startDate", MainController.startDate);
     map.addAttribute("endDate", MainController.endDate);


  }
}
